package net.stratusprogramming.school.Game.Framework.System;

import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;

public class MscFunctions {
	public static void binCopy(File src, File dest) {
		try {
			FileInputStream fin = new FileInputStream(src);
			FileOutputStream fout = new FileOutputStream(dest);

			byte[] b = new byte[1024];
			int nBytes = 0;

			while ((nBytes = fin.read(b)) != -1) {
				fout.write(b, 0, nBytes);
			}
			fin.close();
			fout.close();

		} catch (FileNotFoundException fnf) {
			System.out.println("Specified file not found :" + fnf);
		} catch (IOException ioe) {
			System.out.println("Error while copying file :" + ioe);
		}
	}
}
